<template>
  <view class="container">
    <view class="content">
      <view class="image-placeholder"></view>
      <text class="message">省心卖房!全全托管，已推荐当地职业经理人{{clerkName}}为您提供详细的服务</text>
    </view>
    <button class="contact-btn" @click="contact">立即联系</button>
  </view>
</template>

<script>
import {getClerkDetail}  from '@/api/store'
export default {
  data() {
    return {
      clerk:{},
      talkId:'',
      clerkName:'',
    }
  },
  onLoad(options) {
           this.talkId=options.talkId
    if(undefined!=options.name1){
      this.clerkName=options.name1
    }

    // getClerkDetail(options.clerkId).then(res=>{
    //
    //   if(res.data.code==200){
    //         this.clerk =res.data.result;
    //   }
    // })
    // 页面加载时执行
  },
  methods: {
    contact() {
      //拨打电话
      // uni.makePhoneCall({
      //   phoneNumber: this.clerk.mobile,
      // });

      //跳转到聊天界面--/pages/mine/im/index?talkId=1916782915438723072
      uni.navigateTo({
        url: '/pages/mine/im/index?talkId='+this.talkId
      });
     // this.$options.filters.talkIm(this.talkId, '', '')

      // 这里可以添加点击按钮后的逻辑，比如跳转到联系页面或拨打电话等
      console.log('点击了立即联系按钮');
    }
  }
}
</script>

<style scoped>
.container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100vh;
  padding: 20px;
  background-color: #ffffff;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.image-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #f0f0f0;
  margin-bottom: 20px;
}

.message {
  font-size: 16px;
  line-height: 1.5;
  color: #333333;
}

.contact-btn {
  width: 100%;
  padding: 10px;
  background-color: #e0e0e0;
  color: #000000;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}
</style>